#!/bin/python

#
#Xithyl, Test Driven Development for C
#Copyright (C) 2012  Stepan Henek
#
#This program is free software: you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation, either version 3 of the License, or
#(at your option) any later version.
#
#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#GNU General Public License for more details.
#
#You should have received a copy of the GNU General Public License
#along with this program.  If not, see <http://www.gnu.org/licenses/>.
#

from xithyl import logger
from xithyl import actions
from xithyl.actions.libc.String import memchr
from xithyl.actions.libc.String import memcmp 
from xithyl.actions.libc.String import memcpy 
from xithyl.actions.libc.String import memmove 
from xithyl.actions.libc.String import memset
from xithyl.actions.libc.String import strcat
from xithyl.actions.libc.String import strncat
from xithyl.actions.libc.String import strchr
from xithyl.actions.libc.String import strcmp

logger.addLogger(__name__)

def testMemchrFunctional(stat):
    logger.log("memchr", __name__)

    memchr.functional1()
    memchr.functional2()
    
    logger.log("memchr done", __name__)

def testMemcmpFunctional(stat):
    logger.log("memcmp", __name__)

    memcmp.functional1()

    logger.log("memcmp done", __name__)

def testMemcpyFunctional(stat):
    logger.log("memcpy", __name__)

    memcpy.functional1()

    logger.log("memcpy done", __name__)

def testMemmoveFunctional(stat):
    logger.log("memmove", __name__)

    memmove.functional1()
    memmove.functional2()
    memmove.functional3()

    logger.log("memmove done", __name__)

def testMemsetFunctional(stat):
    logger.log("memmove", __name__)

    memset.functional1()

    logger.log("memmove done", __name__)

def testStrcatFunctional(stat):
    logger.log("strcat", __name__)

    strcat.functional1()

    logger.log("strcat done", __name__)

def testStrncatFunctional(stat):
    logger.log("strncat", __name__)

    strncat.functional1()
    strncat.functional2()

    logger.log("strncat done", __name__)

def testStrchrFunctional(stat):
    logger.log("strchr", __name__)

    strchr.functional1()
    strchr.functional2()
    strchr.functional3()

    logger.log("strchr done", __name__)

def testStrcmpFunctional(stat):
    logger.log("strcmp", __name__)

    strcmp.functional1()

    logger.log("strcmp done", __name__)
